import { mock } from 'mockjs'
import { builder } from '../util'

export default [
  {
    // 能源流向
    url: '/flow/energy',
    method: 'get',
    response: () => {
      return builder(
        mock({
          data: {
            id: '@guid',
            label: '变压器',
            'energyCost|1-100': 1,
            level: 1,
            'children|4': [
              {
                id: '@guid',
                'label|+1': ['暖通空调', '照明插座', '动力设备', '特殊'],
                'energyCost|1-100': 1,
                level: 2,
                'children|0-3': [
                  {
                    id: '@guid',
                    label: '@cword(3,5)',
                    'energyCost|1-100': 1,
                    level: 3,
                    'children|0-10': [
                      {
                        id: '@guid',
                        label: '@cword(3,5)',
                        'energyCost|1-100': 1,
                        level: 4
                      }
                    ]
                  }
                ]
              }
            ]
          },
          'rank|6': [
            {
              'name|+1': [
                '东广场制冷站3#变压器',
                '西广场深圳通1#主机',
                '东广场办公楼2#主机',
                '东广场办公楼1#主机',
                '西广场办公楼1#主机',
                '西广场深圳通制冷站水泵'
              ],
              'use|2000-10000': 1,
              'per|1-100.1-2': 1
            }
          ]
        })
      )
    }
  }
]
